package com.gla.service;

import com.gla.dao.CommodityMapper;
import com.gla.domain.Commodity;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class CommodityService {
    @Resource
    CommodityMapper commodityMapper;

    public Commodity selectById(Integer commodity_id){
        return commodityMapper.selectCommodityById(commodity_id);
    }

    public void deleteById(Integer commodity_id){
        commodityMapper.deleteCommodityById(commodity_id);
    }

    public void updateNumber(Integer commodity_id, Integer number){
        commodityMapper.updateNumber(commodity_id,number);
    }
}
